﻿#include "highsinglequilting.h"

// 高速单针绗缝机
HighSingleQui::HighSingleQui()
{
    //添加各种参数到列表中
    initRootParasList();
    initRootHMIConfigurationList(m_allParasList);//超级用户界面配置
    initPatternsParasList();
    initSoftwareParasList(m_allParasList);
    initTimeParasList(m_allParasList);
    initMcParasList();
    initWkParasList();

    //初始化控制动作列表
    initOutCtrlList();

    //初始化快捷功能列表
    initShortCutList();

    //初始化辅助功能列表
    initAssistList();

    //初始化花样设置功能列表
    initPatternSetList();

    //参数分类功能
    initParaSetList();

    //初始化传感器列表
    initSensorList();

    //初始化错误代码和状态列表
    initErrorCodeAndStateList();

    //初始化九宫格
    initNinebtn1234();

    //加载右上角信息
    initFileInfoLabel();
}

HighSingleQui::~HighSingleQui()
{

}

//初始化九宫格功能按键
void HighSingleQui::initNinebtn1234()
{
    m_nineBtn.insert(1,NineItem(FUN_HEAD_LIFTING,"buttonHeadLifting"));
    m_nineBtn.insert(2,NineItem(FUN_MANUAL_THREAD_CUTTING,"buttonMunualThreadCutting"));
    m_nineBtn.insert(3,NineItem(FUN_PROCESSRESET,"buttonProcessReset"));
    m_nineBtn.insert(4,NineItem(FUN_SIMULATED_STATUS,"buttonSimulatedStatus"));

}

void HighSingleQui::initFileInfoLabel()
{
    m_fileInfo.append(FileName);
    m_fileInfo.append(Index);
    m_fileInfo.append(BeginPoint);
    m_fileInfo.append(Range);
    m_fileInfo.append(Position);
    m_fileInfo.append(Production);
}

//花样参数
void HighSingleQui::initPatternsParasList()
{
    QTextCodec *cod = QTextCodec::codecForLocale();
    int index = 0; //按顺序排列，想要更改顺序只需要修改代码位置
    //花样参数-花样设置参数-左边；单位：毫米 ，范围0-10000，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        PATTERNPARA_SORT_DSTR | PATTERNPARA_SORT_QUI,
                                        SET_SETLEFT, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Left"),//左边
                                        0, 0, 10000, 0, 1, tr("mm"), tr(""),
                                        tr(""),
                                        0, 0, index++, operate));

    //花样参数-花样设置参数-前边；单位：毫米 ，范围0-10000，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        PATTERNPARA_SORT_DSTR | PATTERNPARA_SORT_QUI,
                                        SET_SETFRONT, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Front"),//前边
                                        0, 0, 10000, 0, 1, tr("mm"), tr(""),
                                        tr(""),
                                        0, 0, index++, operate));

    //花样参数-花样设置参数-缩放x；单位：毫米 ，范围0-20000，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        PATTERNPARA_SORT_DSTR | PATTERNPARA_SORT_QUI,
                                        SET_SCANX, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Width"),//宽度
                                        5000, 0, 20000, 0, 1, tr("mm"), tr(""),
                                        tr(""),
                                        0, 0, index++, operate));

    //花样参数-花样设置参数-缩放y；单位：毫米 ，范围0-20000，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        PATTERNPARA_SORT_DSTR | PATTERNPARA_SORT_QUI,
                                        SET_SCANY, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Height"),//高度
                                        5000, 0, 20000, 0, 1, tr("mm"), tr(""),
                                        tr(""),
                                        0, 0, index++, operate));

    //花样参数-花样设置参数-等比缩放
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        PATTERNPARA_SORT_QUI,
                                        SET_EQUAL, 0, 0, PARA_VALUE_TYPE_SW,
                                        tr("Equal ratio"),//等比缩放
                                        1, 0, 1, 1, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, index++, operate));

    //花样参数-花样设置参数-翻转式样；单位：无 ，范围0-7，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        PATTERNPARA_SORT_DSTR | PATTERNPARA_SORT_QUI,
                                        SET_ROTATESTYLE, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Flip style"),//翻转式样
                                        0, 0, 7, 0, 0, tr(""), tr(""),
                                        tr("normalP:0;nRight90P:1;nRight180P:2;nRight270P:3;mirrorP:4;mRight90P:5;mRight180P:6;mRight270P:7"),
                                        0, 0, index++, operate));

    //花样参数-花样设置参数-旋转角度；单位：° ，范围0-90，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        PATTERNPARA_SORT_DSTR | PATTERNPARA_SORT_QUI,
                                        SET_ROTATEANGLE, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Rotation angle"),//旋转角度
                                        0, 0, 90, 0, 0, cod->toUnicode("°"), tr(""),//度
                                        tr(""), 0, 0,index++, operate));

    //花样参数-花样设置参数-针步大小；单位：毫米 ，范围20-80，默认20
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        PATTERNPARA_SORT_DSTR | PATTERNPARA_SORT_QUI,
                                        SET_SETSTEPSIZE, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Step size"),//针步大小
                                        20, 20, 80, 20, 1, tr("mm"), tr(""),
                                        tr(""),
                                        0, 0, index++, operate));

    //绣花机-花样参数-花样设置参数-加固方式；单位：无 ，范围0-1，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        PATTERNPARA_SORT_DSTR | PATTERNPARA_SORT_QUI,
                                        SET_REINMODE, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Reinforcement method"),//加固方式
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("Tight locking:0;Reinforced locking:1"),//密针锁针:0;加固锁针:1
                                        0, 0,index++, operate));

    //绣花机-花样参数-花样设置参数-加固针数；单位：针 ，范围0-10，默认2
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        PATTERNPARA_SORT_DSTR | PATTERNPARA_SORT_QUI,
                                        SET_REINNEEDLE, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Reinforcement needles"),//加固针数
                                        2, 0, 10, 2, 0, tr("pin"), tr(""),//针
                                        tr(""), 0, 0,index++, operate));

    //绣花机-花样参数-花样设置参数-加固次数；单位：次 ，范围0-10，默认2
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        PATTERNPARA_SORT_DSTR | PATTERNPARA_SORT_QUI,
                                        SET_REINNUM, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Reinforcement frequency"),//加固次数
                                        2, 0, 10, 2, 0, tr(""), tr(""),
                                        tr(""), 0, 0,index++, operate));

#if(0)
    //花样参数-花样设置参数-角度修正量；单位：毫米 ，范围0-200，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        PATTERNPARA_SORT_DSTR | PATTERNPARA_SORT_QUI,
                                        SET_ANGLECORROFFSET, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Angle correction offset"),//角度修正量
                                        0, 0, 200, 0, 1, tr("mm"), tr(""),
                                        tr(""),
                                        0, 0, index++, operate));
#else
    //花样参数-花样设置参数-角度修正x正；单位：毫米 ，范围0-200，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        PATTERNPARA_SORT_DSTR | PATTERNPARA_SORT_QUI,
                                        SET_ANGLECORRPOSX, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Angle correction x positive"),//角度修正x正
                                        0, 0, 200, 0, 1, tr("mm"), tr(""),
                                        tr(""),
                                        0, 0, index++, operate));

    //花样参数-花样设置参数-角度修正x负；单位：毫米 ，范围0-200，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        PATTERNPARA_SORT_DSTR | PATTERNPARA_SORT_QUI,
                                        SET_ANGLECORRNEGX, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Angle correction x negative"),//角度修正x负
                                        0, 0, 200, 0, 1, tr("mm"), tr(""),
                                        tr(""),
                                        0, 0, index++, operate));

    //花样参数-花样设置参数-角度修正y正；单位：毫米 ，范围0-200，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        PATTERNPARA_SORT_DSTR | PATTERNPARA_SORT_QUI,
                                        SET_ANGLECORRPOSY, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Angle correction y positive"),//角度修正y正
                                        0, 0, 200, 0, 1, tr("mm"), tr(""),
                                        tr(""),
                                        0, 0, index++, operate));

    //花样参数-花样设置参数-角度修正y负；单位：毫米 ，范围0-200，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        PATTERNPARA_SORT_DSTR | PATTERNPARA_SORT_QUI,
                                        SET_ANGLECORRNEGY, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Angle correction y negative"),//角度修正y负
                                        0, 0, 200, 0, 1, tr("mm"), tr(""),
                                        tr(""),
                                        0, 0, index++, operate));

    //花样参数-花样设置参数-起始点x；范围-1000000--1000000，单位0.01mm，默认 0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        PATTERNPARA_SORT_DSTR ,
                                        SET_STARTX, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("startX"),//起始点X
                                        0, -1000000, 1000000, 0, 2, tr("mm"), tr(""),//mm
                                        tr(""),
                                        0, 0,index++, operate));

    //花样参数-花样设置参数-起始点y；范围-1000000--1000000，单位0.01mm，默认 0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        PATTERNPARA_SORT_DSTR ,
                                        SET_STARTY, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("startrY"),//起始点Y
                                        0, -1000000, 1000000, 0, 2, tr("mm"), tr(""),//mm
                                        tr(""),
                                        0, 0,index++, operate));
#endif


    //花样参数---------------------------
}

//机器参数
void HighSingleQui::initMcParasList()
{
    //    QTextCodec *cod = QTextCodec::codecForLocale();


    //自动换梭装置, 范围0-1，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        0, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Automatic shuttle changing device"),//自动换梭装置
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("No:0;Have:1"),
                                        0, 0, 0x0001, operate));

    //安全装置配置, 范围0-1，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        1, 1, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Infrared device"),//红外装置
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("Normally closed:0;Normally open:1"),
                                        0, 0, 0x0002, operate));

    //气压装置, 范围0-1，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        1, 2, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Pneumatic device"),//气压装置
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("Normally closed:0;Normally open:1"),
                                        0, 0, 0x0002, operate));

    //上电装置, 范围0-1，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        1, 3, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Power-on device"),//上电装置
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("Normally closed:0;Normally open:1"),
                                        0, 0, 0x0002, operate));

    //安全门装置, 范围0-1，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        1, 5, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Safety door device"),//安全门装置
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("Normally closed:0;Normally open:1"),
                                        0, 0, 0x0002, operate));

    //手自动按钮装置, 范围0-1，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        1, 6, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Manual and automatic button device"),//手自动按钮装置
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("Normally closed:0;Normally open:1"),
                                        0, 0, 0x0002, operate));

    //X可移动区域正边界, 范围S32_MIN--S32_MAX，默认207500
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        2, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("X movable area positive boundary"),//X可移动区域正边界
                                        207500, S32_MIN, S32_MAX, 207500, 2, tr("mm"), tr(""),
                                        tr(""),
                                        207500, 207500, 0x0004, operate));

    //Y可移动区域正边界, 范围S32_MIN--S32_MAX，默认99300
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        3, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Y movable area positive boundary"),//Y可移动区域正边界
                                        99300, S32_MIN, S32_MAX, 99300, 2, tr("mm"), tr(""),
                                        tr(""),
                                        99300, 99300, 0x0006, operate));

    //x可缝纫区域负边界, 范围S32_MIN--S32_MAX，默认6800
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        4, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("X Sewing area Negative boundary"),//x可缝纫区域负边界
                                        6800, S32_MIN, S32_MAX, 6800, 2, tr("mm"), tr(""),
                                        tr(""),
                                        6800, 6800, 0x0007, operate));

    //x可缝纫区域正边界, 范围S32_MIN--S32_MAX，默认128800
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        5, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("X Sewing area Positive margin"),//x可缝纫区域正边界
                                        128800, S32_MIN, S32_MAX, 128800, 2, tr("mm"), tr(""),
                                        tr(""),
                                        128800, 128800, 0x0008, operate));

    //y可缝纫区域负边界, 范围S32_MIN--S32_MAX，默认20300
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        6, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Y Sewing area Negative boundary"),//y可缝纫区域负边界
                                        20300, S32_MIN, S32_MAX, 20300, 2, tr("mm"), tr(""),
                                        tr(""),
                                        20300, 20300, 0x0009, operate));

    //y可缝纫区域正边界, 范围S32_MIN--S32_MAX，默认99300
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        7, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Y Sewing area Positive margin"),//y可缝纫区域正边界
                                        99300, S32_MIN, S32_MAX, 99300, 2, tr("mm"), tr(""),
                                        tr(""),
                                        99300, 99300, 0x0010, operate));


    //进料编码器系数分子, 范围S32_MIN--S32_MAX，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        8, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Encoder coefficient molecule"),//进料编码器系数分子
                                        0, S32_MIN, S32_MAX, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x0011, operate));

    //    //进料编码器系数分母, 范围S32_MIN--S32_MAX，默认0
    //    m_allParasList.append(makeAParaItem(0,
    //                                    PARA_TYPE_MACH,
    //                                    MC_SORT_SETTING,
    //                                    205, 0, 0, PARA_VALUE_TYPE_INT,
    //                                    tr("Encoder coefficient denominator"),//进料编码器系数分母
    //                                    0, S32_MIN, S32_MAX, 0, 0, tr(""), tr(""),
    //                                    tr(""),
    //                                    0, 0, 0x00C3, operate));



    //零切距离, 范围S32_MIN--S32_MAX，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        9, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Zero tangent distance"),//零切距离
                                        0, S32_MIN, S32_MAX, 0, 0, tr("mm"), tr(""),
                                        tr(""),
                                        0, 0, 0x0012, operate));
    //切料箱装置选择, 范围0-1，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        10, 1, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Feeding device"),//进料装置
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("No:0;Have:1"),
                                        0, 0, 0x0013, operate));

    //横切装置, 范围0-1，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        10, 2, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Crosscutting device"),//横切装置
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("No:0;Have:1"),
                                        0, 0, 0x0013, operate));

    //夹布装置, 范围0-1，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        10, 3, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Cloth clamping device"),//夹布装置
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("No:0;Have:1"),
                                        0, 0, 0x0013, operate));

    //张紧装置, 范围0-1，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        10, 4, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Tensioning device"),//张紧装置
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("No:0;Have:1"),
                                        0, 0, 0x0013, operate));

    //边切装置, 范围0-1，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        10, 5, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Edge cutting device"),//边切装置
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("No:0;Have:1"),
                                        0, 0, 0x0013, operate));

}

//工作参数
void HighSingleQui::initWkParasList()
{
    QTextCodec *cod = QTextCodec::codecForLocale();

    // 主轴缝纫工作转速, 范围 1--3000，单位r/min，默认2000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SPEED,
                                        0, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("sewing work speed"),// 主轴缝纫工作转速
                                        2000, 1, 3000, 2000, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x0100, operate));

    // 主轴回针转速, 范围 1--500，单位r/min，默认 200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SPEED,
                                        1, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Spindle Back needle speed"),// 主轴回针转速
                                        200, 1, 500, 200, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x0101, operate));

    // 缝纫动框方式, 范围 0--1，默认 0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_ACTION,
                                        2, 1, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Sewing moving frame"),// 缝纫动框方式
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("Continuous:0;Intermittent:1"), 0, 0, 0x0102, operate));//连续:0;间歇式:1

    // 缝纫加减速方式, 范围 0--1，默认 1
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_ACTION,
                                        2, 2, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Sewing acceleration and deceleration mode"),// 缝纫加减速方式
                                        1, 0, 1, 1, 0, tr(""), tr(""),
                                        tr("No acceleration or deceleration:0;Xy sine acceleration and deceleration:1"), //无加速或减速:0;Xy正弦加速度和减速度:1
                                        1, 1, 0x0102, operate));

    // 缝纫机头旋转方式, 范围 0--1，默认 0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_ACTION,
                                        2, 3, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Sewing machine head rotating manner"),// 缝纫机头旋转方式
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("Continuous rotation:0;Xy intermittent rotation:1"),//连续旋转:0;Xy间歇旋转:1
                                        0, 0, 0x0102, operate));

    // 缝纫机头加减速方式, 范围 0--1，默认 1
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_ACTION,
                                        2, 4, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Sewing head deceleration mode"),// 缝纫机头加减速方式
                                        1, 0, 1, 1, 0, tr(""), tr(""),
                                        tr("No acceleration or deceleration:0;Intermittent acceleration and deceleration:1"), //无加速或减速:0;间歇加减速:1
                                        1, 1, 0x0102, operate));//无加速或减速：0；间歇加减速：1

    // 起针动作允许; 位图选择, 0, 不允许; 1, 允许;
    // bit0, 松线允许;
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_ACTION,
                                        3, 1, 0, PARA_VALUE_TYPE_SW,
                                        tr("Allow for needle starting and thread loosening"),// 起针松线允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0102, operate));
    // bit1, 夹线允许;
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_ACTION,
                                        3, 2, 0, PARA_VALUE_TYPE_SW,
                                        tr("Needle and thread clamping allowed"),// 起针夹线允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0102, operate));

    // 剪线允许, 范围 0--3，默认 1
    // 剪线允许; 0, 不剪线; 1, 自动剪线; 2, 最后剪线；3,数据剪线；默认1
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_ACTION,
                                        4, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Cut lines allow"),// 剪线允许
                                        1, 0, 3, 1, 0, tr(""), tr(""),
                                        tr("Do not trim:0;Automatic thread trim:1;Finally trim:2;Data trim:3"),//不剪线:0;自动剪线:1;最后剪线:2;数据剪线:3
                                        1, 1, 0x0104, operate));
    // bit0, 松线允许;
    // 剪线时松线允许, 范围 0--1，默认 0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_ACTION,
                                        5, 1, 0, PARA_VALUE_TYPE_SW,
                                        tr("Thread loosening is allowed during thread cutting"),// 剪线时松线允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0105, operate));
    // bit1, 拉线允许;
    // 剪线时拉线允许, 范围 0--1，默认 0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_ACTION,
                                        5, 2, 0, PARA_VALUE_TYPE_SW,
                                        tr("During thread cutting, the stay wire is allowed"),// 剪线时拉线允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0105, operate));
    // bit2, 夹线允许;
    // 剪线时夹线允许, 范围 0--1，默认 0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_ACTION,
                                        5, 3, 0, PARA_VALUE_TYPE_SW,
                                        tr("Thread clamping is allowed during thread cutting"),// 剪线时夹线允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0105, operate));
    // bit3, 提升压脚允许;
    // 剪线时提升压脚允许, 范围 0--1，默认 0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_ACTION,
                                        5, 4, 0, PARA_VALUE_TYPE_SW,
                                        tr("It is allowed to lift the presser foot during thread trimming"),// 剪线时提升压脚允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0105, operate));
    // bit4, 提升机头剪线;
    // 剪线时提升机头剪线允许, 范围 0--1，默认 0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_ACTION,
                                        5, 5, 0, PARA_VALUE_TYPE_SW,
                                        tr("Lifting machine head thread cutting is allowed during thread cutting"),// 剪线时提升机头剪线允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0105, operate));
    // bit5, 提升机头夹线;0:允许 1:不允许
    // 剪线时提升机头夹线允许, 范围 0--1，默认 0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_ACTION,
                                        5, 6, 0, PARA_VALUE_TYPE_SW,
                                        tr("The thread clamping of the lifting head is allowed during thread cutting"),// 剪线时提升机头夹线允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0105, operate));
    // bit6, 在压脚下勾线;0:允许 1:不允许
    // 剪线时在压脚下勾线允许, 范围 0--1，默认 0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_ACTION,
                                        5, 7, 0, PARA_VALUE_TYPE_SW,
                                        tr("It is allowed to hook the thread at the foot of the presser during thread cutting"),// 剪线时在压脚下勾线允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0105, operate));

    // bit7, 退针允许；0:允许 1:不允许
    // 剪线时退针允许, 范围 0--1，默认 0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_ACTION,
                                        5, 8, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Needle withdrawal allowed during thread trimming"),// 剪线时退针允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0105, operate));
    // bit8, 扣线允许；0:允许 1:不允许
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_ACTION,
                                        5, 9, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Buckle the thread allowed during thread trimming"),// 剪线时扣线允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0105, operate));


    // 断线检测针数, 范围 0--10，默认 3
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_DETECT,
                                        6, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Number of broken wires"),// 断线检测针数
                                        3, 0, 10, 3, 0, tr("Needles"), tr(""),//针
                                        tr(""), 0, 0, 0x0106, operate));

    // 换梭芯提醒功能, 范围 0--3，默认 0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_DETECT,
                                        7, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Change bobbin Reminder function"),// 换梭芯提醒功能
                                        0, 0, 3, 0, 0, tr(""), tr(""),  //未启用:0;按长度划分的延迟提醒:1;按切片数计数:2;按长度立即提醒:3
                                        tr("Not:0;Delay reminder by length:1;Count by number of slices:2;Immediately reminder by length:3"), 0, 0, 0x0107, operate));

    // 底线长度, 范围 0--S32_MAX，默认 10000000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_DETECT,
                                        8, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Bottom line length"),// 底线长度
                                        10000000, 0, S32_MAX, 10000000, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0108, operate));

    // 换梭片数计数, 范围 0--1000，默认 0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_DETECT,
                                        9, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Number of shuttles"),// 换梭片数计数
                                        0, 0, 1000, 0, 0, tr("times"), tr(""),
                                        tr(""), 0, 0, 0x0109, operate));

    // 加油方式选择, 范围 0--3，默认 0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_ACTION,
                                        10, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Refueling method selection"),// 加油方式选择
                                        0, 0, 3, 0, 0, tr(""), tr(""),//不加油:0;按工作时间间断加油:1;按工作针数间歇加油:2;持续加油:3
                                        tr("No:0; According to working hours:1; According to the number of working stitches:2; Persistent refueling:3"), 0, 0, 0x010A, operate));

    // 加油针数间隔, 范围 S32_MIN--S32_MAX，默认 10000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_ACTION,
                                        11, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Refueling needles interval"),// 加油针数间隔
                                        10000, S32_MIN, S32_MAX, 10000, 0, tr("Needles"), tr(""),
                                        tr(""), 0, 0, 0x010B, operate));

    //    // 加油时间间隔, 范围 1--S32_MAX，默认 1
    //    m_allParasList.append(makeAParaItem(0,
    //                                    PARA_TYPE_WORK,
    //                                    MC_SORT_ACTION,
    //                                    12, 0, 0, PARA_VALUE_TYPE_INT,
    //                                    tr("Refueling time interval"),// 加油时间间隔
    //                                    1, 1, S32_MAX, 1, 0, tr("s"), tr(""),
    //                                    tr(""), 0, 0, 0x010C, operate));

    // 加油持续时长, 范围 1--S32_MAX，默认 1
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_ACTION,
                                        13, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Refueling duration"),// 加油持续时长
                                        1, 1, S32_MAX, 1, 0, tr("s"), tr(""),
                                        tr(""), 1, 1, 0x010D, operate));

    // 完成后停车位置选择, 范围 0--4，默认 0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_ACTION,
                                        14, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Parking position selection after completion"),// 完成后停车位置选择
                                        0, 0, 4, 0, 0, tr(""), tr(""),
                                        tr("Current:0;Starting:1;Anchor:2;Feeding:3;Offset:4"),//当前点:0;起始点:1;定位点:2;上料点:3;偏移点:4
                                        0, 0, 0x010E, operate));

    // 偏移点坐标有效标志, 范围 0--3，默认 0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_POSITION,
                                        15, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Offset point coordinate valid flag"),// 偏移点坐标有效标志
                                        0, 0, 3, 0, 0, tr(""), tr(""),
                                        tr("Invalid:0;X is valid:1;Y is valid:2;XY is valid:3"),//无效:0;X有效:1;Y有效:2;XY同时有效:3
                                        0, 0, 0x010F, operate));

    // 偏移点坐标X, 范围 S32_MIN--S32_MAX，默认 0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_POSITION,
                                        16, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Offset point coordinate X"),// 偏移点坐标X
                                        0, S32_MIN, S32_MAX, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0110, operate));

    // 偏移点坐标Y, 范围 S32_MIN--S32_MAX，默认 0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_POSITION,
                                        17, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Offset point coordinate Y"),// 偏移点坐标Y
                                        0, S32_MIN, S32_MAX, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0111, operate));

    // 穿线点坐标有效标志, 范围 0--3，默认 0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_POSITION,
                                        18, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Threading point coordinate effective mark"),// 穿线点坐标有效标志
                                        0, 0, 3, 0, 0, tr(""), tr(""),
                                        tr("Invalid:0;X is valid:1;Y is valid:2;XY is valid:3"),//无效:0;X有效:1;Y有效:2;XY同时有效:3
                                        0, 0, 0x0112, operate));

    // 穿线点坐标X, 范围 S32_MIN--S32_MAX，默认 0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_POSITION,
                                        19, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Threading point coordinates X"),// 穿线点坐标X
                                        0, S32_MIN, S32_MAX, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0113, operate));

    // 穿线点坐标 Y, 范围 S32_MIN--S32_MAX，默认 0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_POSITION,
                                        20, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Threading point coordinates Y"),// 穿线点坐标Y
                                        0, S32_MIN, S32_MAX, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0114, operate));

    // 产量预设, 范围 0--S32_MAX，默认 0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_DETECT,
                                        21, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Production preset"),// 产量预设
                                        0, 0, S32_MAX, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0115, operate));

    // 剪线动框位移, 范围 1--1000，默认 500
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_ACTION,
                                        22, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Trimming frame displacement"),// 剪线动框位移
                                        500, 1, 1000, 500, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0116, operate));

    // 缝纫时自动回穿线点允许, 范围 0--1，默认 0
    // bit1 自动回穿线点允许;
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        23, 2, 0, PARA_VALUE_TYPE_SW,
                                        tr("Automatic threading back point is allowed during sewing"),// 缝纫时自动回穿线点允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0117, operate));

    // 缝纫间越框机头升降, 范围 0--max，默认 0
    // bit1, 缝纫间越框机头升降;
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_ACTION,
                                        24, 2, 0, PARA_VALUE_TYPE_SW,
                                        tr("Lifting and lowering of frame crossing machine head in sewing room"),// 缝纫间越框机头升降
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0117, operate));

    // 移框时动作选择, 范围 0--1，默认 0
    // bit0, 松线允许;
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_ACTION,
                                        25, 1, 0, PARA_VALUE_TYPE_SW,
                                        tr("Moving basket Loose line"),// 移框松线允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0117, operate));

    // 移框夹线允许, 范围 0--1，默认 0
    // bit1, 夹线允许;
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_ACTION,
                                        25, 2, 0, PARA_VALUE_TYPE_SW,
                                        tr("Moving basket Clamp line"),// 移框夹线允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0117, operate));

    // 移框自动压框允许, 范围 0--1，默认 0
    // bit2, 开框允许
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_ACTION,
                                        25, 3, 0, PARA_VALUE_TYPE_SW,
                                        tr("Frame moving and automatic frame pressing allowed"),// 移框自动压框允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0117, operate));

    // 移框扣线允许, 范围 0--1，默认 0
    // bit4. 叩线允许
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_ACTION,
                                        25, 5, 0, PARA_VALUE_TYPE_SW,
                                        tr("Allowed to move frame and thread"),// 移框扣线允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0117, operate));

    // 软件限位XY移动允许, 范围 0--1，默认 0
    // bit0, xy移动;
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        26, 1, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Software limit XY move allowed"),// 软件限位XY移动允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("Not allow:0;Allowed:1"), 0, 0, 0x011C, operate));

    // 剪线动框方向, 0, 不动框; 1, 向左; 2, 向前; 3, 向右; 4, 向后
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        27, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Thread trimming moving frame direction"),// 剪线动框方向
                                        0, 0, 4, 0, 0, tr(""), tr(""),
                                        tr("Fixed frame:0;Left:1;Forward:2;Right:3;Backward:4"), 0, 0, 0x0122, operate));


    // 主轴拐角转速, 范围 1--3000，单位r/min，默认 1000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        28, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Spindle corner speed"),// 主轴拐角转速
                                        1000, 1, 3000, 1000, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x0123, operate));

    // 降速最小偏差角度, 范围 0--180，默认 180
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        29, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Minimum speed deviation angle"),// 降速最小偏差角度
                                        180, 0, 180, 180, 0, cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0124, operate));

    // 开机自动找零, 范围 0--1，默认 1
    //BIT0:1:开机自动找零, 0:开机不自动找零
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        30, 1, 0, PARA_VALUE_TYPE_SW,
                                        tr("Auto Zero after power on"),// 开机自动归零
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0125, operate));

    // 缝纫降速模式:0:自动降速,1参数降速,2不降速
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        31, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Sewing speed reduction mode"),// 缝纫降速模式
                                        0, 0, 2, 0, 0, tr(""), tr(""),
                                        tr("Auto:0;Param:1;Not:2"), 0, 0, 0x0126, operate));//0:自动降速,1参数降速,2不降速

    // 机器动作配置, 范围 0--1
    // bit0 自动拉料允许;
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        32, 1, 0, PARA_VALUE_TYPE_SW,
                                        tr("Automatic drawing is allowed"),// 自动拉料允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0126, operate));

    // 进料时对边允许, 范围 0--1
    // bit1 进料时对边允许;
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        32, 2, 0, PARA_VALUE_TYPE_SW,
                                        tr("The opposite side is allowed when feeding"),// 进料时对边允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0126, operate));

    // 进料时展布允许, 范围 0--1，默认 1
    // bit2 进料时展布允许;
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        32, 3, 0, PARA_VALUE_TYPE_SW,
                                        tr("Allowing distribution during feeding"),// 进料时展布允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0126, operate));

    // 进料时中切允许, 范围 0--1，默认 1
    // bit3 进料时中切允许;
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        32, 4, 0, PARA_VALUE_TYPE_SW,
                                        tr("Medium cutting is allowed during feeding"),// 进料时中切允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0126, operate));

    // 进料时中切对边允许, 范围 0--1，默认 1
    // bit4 进料时中切对边允许;
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        32, 5, 0, PARA_VALUE_TYPE_SW,
                                        tr("During feeding, it is allowed to cut across the edge"),// 进料时中切对边允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0126, operate));

    // 机头升降时松线允许, 范围 0--1，默认 1
    // bit5 机头升降时松线允许;
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        32, 6, 0, PARA_VALUE_TYPE_SW,
                                        tr("The thread loosening is allowed when the head is lifting"),// 机头升降时松线允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0126, operate));

    // 安全输入光幕允许, 范围 0--1，默认 0
    // bit0, 光幕;
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        33, 1, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Secure input light curtain allows"),// 安全输入光幕允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("Not allow:0;Allowed:1"), 0, 0, 0x0127, operate));

    // 安全输入气压允许, 范围 0--1，默认 1
    // bit1, 气压;
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        33, 2, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Safety input pressure allowed"),// 安全输入气压允许
                                        1, 0, 1, 1, 0, tr(""), tr(""),
                                        tr("Not allow:0;Allowed:1"), 1, 1, 0x0127, operate));

    // 安全输入上电信号允许, 范围 0--1，默认 0
    // bit2, 上电信号;
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        33, 3, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Safe input power-on signal allowed"),// 安全输入上电信号允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("Not allow:0;Allowed:1"), 0, 0, 0x0127, operate));

    // 安全输入安全门允许, 范围 0--1，默认 0
    // bit4, 安全门
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        33, 5, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Safe input emergency door allowed"),// 安全输入安全门允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("Not allow:0;Allowed:1"), 0, 0, 0x0127, operate));

    // 安全输入手自动允许, 范围 0--1，默认 0
    // bit5 手自动按钮
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        33, 6, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Manual and automatic safe input"),// 安全输入手自动允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("Not allow:0;Allowed:1"), 0, 0, 0x0127, operate));

    // 循环工作允许, 范围 0--1，默认 0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        34, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Loop work allowed"),// 循环工作允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("Not allow:0;Allowed:1"), 0, 0, 0x0128, root));

    // 梭加油持续时长, 范围 0--S32_MAX，默认 0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        35, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Shuttle refueling duration"),// 梭加油持续时长
                                        0, 0, S32_MAX, 0, 0, tr("s"), tr(""),
                                        tr(""), 0, 0, 0x0129, root));


    // 缝纫吹气时间,范围0-10,单位 s，默认0(0为持续吹气)
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        36, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Replace the punch count value"),// 缝纫吹气时间
                                        0, 0, 10, 0, 0, tr("s"), tr(""),
                                        tr(""), 0, 0, 0x0130, operate));

    // 缝纫动框起始角度, 0--36000, 单位 0.01度，默认 28000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        37, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Starting angle of sewing frame"),// 缝纫动框起始角度
                                        28000, 0, 36000, 36000, 2, cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0130, operate));

    // 剪线分线角度，0--36000, 单位 0.01度，默认 20000	// beifen1;			// 备用1
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        38, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Replace the punch count value"),// 缝纫吹气时间
                                        20000, 0, 36000, 36000, 2, cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0130, operate));

    // 剪线完成角度，0--36000, 单位 0.01度，默认 6000	// beifen2;			// 备用2
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        39, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Trimming completion angle"),// 剪线完成角度
                                        6000, 0, 36000, 36000, 2, cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0130, operate));
    // 主轴停车传感器角度，0--36000, 单位 0.01度，默认 6000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        40, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Spindle parking sensor angle"),// 主轴停车传感器角度
                                        6000, 0, 36000, 36000, 2, cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0130, operate));
    // 主轴剪线转速, 范围 1--500，单位r/min，默认 120u32 // beifen4;
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        41, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Spindle thread cutting speed"),//主轴剪线转速
                                        120, 1, 500, 36000, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x0130, operate));


}

//电机和控制动作
void HighSingleQui::initOutCtrlList()
{
    m_allOutCtrlList.clear();

    m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0001,tr("X to move motor"),MT_LX,// X向移动电机
                                             enableStr,true,OUTCONTROL_ENABLE,-1,-1,
                                             disableStr,true,OUTCONTROL_DISABLE,-1,-1,
                                             jogPStr,true,-1,OUTCONTROL_JOGP,OUTCONTROL_STOP,
                                             jogNStr,true,-1,OUTCONTROL_JOGN,OUTCONTROL_STOP,
                                             zeroStr,true,OUTCONTROL_ZERO,-1,-1));

    m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0002,tr("Y to move motor"),MT_LY,// Y向移动电机
                                             enableStr,true,OUTCONTROL_ENABLE,-1,-1,
                                             disableStr,true,OUTCONTROL_DISABLE,-1,-1,
                                             jogPStr,true,-1,OUTCONTROL_JOGP,OUTCONTROL_STOP,
                                             jogNStr,true,-1,OUTCONTROL_JOGN,OUTCONTROL_STOP,
                                             zeroStr,true,OUTCONTROL_ZERO,-1,-1));

    m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0003,tr("Spindle motor"),MT_LM,// 主轴电机
                                             enableStr,true,OUTCONTROL_ENABLE,-1,-1,
                                             disableStr,true,OUTCONTROL_DISABLE,-1,-1,
                                             jogPStr,true,-1,OUTCONTROL_JOGP,OUTCONTROL_STOP,
                                             jogNStr,true,-1,OUTCONTROL_JOGN,OUTCONTROL_STOP,
                                             zeroStr,true,OUTCONTROL_ZERO,-1,-1));

    m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0004,tr("Needle motor"),MT_LN,// 针电机
                                             enableStr,true,OUTCONTROL_ENABLE,-1,-1,
                                             disableStr,true,OUTCONTROL_DISABLE,-1,-1,
                                             jogPStr,true,-1,OUTCONTROL_JOGP,OUTCONTROL_STOP,
                                             jogNStr,true,-1,OUTCONTROL_JOGN,OUTCONTROL_STOP,
                                             zeroStr,true,OUTCONTROL_ZERO,-1,-1));

    m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0005,tr("Shuttle motor"),MT_LH,// 梭电机
                                             enableStr,true,OUTCONTROL_ENABLE,-1,-1,
                                             disableStr,true,OUTCONTROL_DISABLE,-1,-1,
                                             jogPStr,true,-1,OUTCONTROL_JOGP,OUTCONTROL_STOP,
                                             jogNStr,true,-1,OUTCONTROL_JOGN,OUTCONTROL_STOP,
                                             zeroStr,true,OUTCONTROL_ZERO,-1,-1));

    m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0006,tr("Lifting motor"),MT_LU,// 升降电机
                                             enableStr,true,OUTCONTROL_ENABLE,-1,-1,
                                             disableStr,true,OUTCONTROL_DISABLE,-1,-1,
                                             jogPStr,true,-1,OUTCONTROL_JOGP,OUTCONTROL_STOP,
                                             jogNStr,true,-1,OUTCONTROL_JOGN,OUTCONTROL_STOP,
                                             zeroStr,true,OUTCONTROL_ZERO,-1,-1));

    m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0007,tr("Lower scissors to cut thread"),OT_DCUT_THREAD,// 下剪刀剪线
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             openStr,true,OUTCONTROL_OPEN,-1,-1,
                                             closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0008,tr("Buckle the bottom line"),OT_PUSH_BTRD,// 扣底线
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

    m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0009,tr("Elastic thread"),OT_LOOSE_THREAD,// 松紧线
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             openStr,true,OUTCONTROL_OPEN,-1,-1,
                                             closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000A,tr("oil"),OT_OIL,// 加油
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000B,tr("headlamp"),OT_LIGHT,// 照明灯
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000C,tr("Sewing machine head lifting"),OT_SEW_LIFT,// 缝纫机头升降
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000D,tr("Sandwich line"),OT_CLIP_UTRD,// 夹面线
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000E,tr("Shuttle changing device grabbing"),OT_CHBOB_GRAB_OPEN,// 换梭装置抓取
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000F,tr("Shuttle changer swing"),OT_CHBOB_SWAY_PUSH,// 换梭装置摆动
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0010,tr("Shuttle changer rotation"),OT_CHBOB_SPIN,// 换梭装置旋转
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));

        m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0011,tr("Sewing Blow"),OT_SEW_BLOW,// 缝纫吹气
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 "",false,-1,-1,-1,
                                                 openStr,true,OUTCONTROL_OPEN,-1,-1,
                                                 closeStr,true,OUTCONTROL_CLOSE,-1,-1));
}

//快捷功能
void HighSingleQui::initShortCutList()
{
    m_allShortCutList.clear();
    int index = 1;
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("AllToZero"),"buttonFrameZero",FUN_ALLTOZERO));//全部归零
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("Front_Back"),"buttonForwardOrBack",FUN_FORWARDORBACK));// 快进快退
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("BackThread"),"buttonSetAnchorPoint",FUN_BACKTHREADPOINT));//回穿线点
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("N/S_Proof"),"buttonAutoParas",FUN_MAINSHAFT_ADJUST));//针梭校对
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("BackOffset"),"buttonQuantityMoveFrame",FUN_BACKOFFSETPOINT));//回偏移点
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("BackZero"),"buttonSetAnchorPoint",FUN_BACKZEROPOINT));//回零点
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("CountReset"),"buttonCommonFunction",FUN_COUNTRESET));//底线计数清零
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("OutputReset"),"buttonSetAnchorPoint",FUN_OUTPUTRESET));//产量清零
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("NeedZeroPos"),"buttonSetStartPoint",FUN_NEDDLEZEROPOS));//对针零位
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("ShutZeroPos"),"buttonSetAnchorPoint",FUN_SHUTTLEZEROPOS));//对梭零位
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("HeadLifting"),"buttonHeadLifting",FUN_HEAD_LIFTUPDOWN));//机头升降
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("ThreadCut"),"buttonMunualThreadCutting",FUN_MANUAL_THREAD_CUTTING));//手动剪线
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("ProcessReset"),"buttonProcessReset",FUN_PROCESSRESET));//流程复位
    m_allShortCutList.append(makeAShortCutItem(0,index++,tr("Simulated"),"buttonSimulatedStatus",FUN_SIMULATED_STATUS));// 模拟缝纫
    m_allShortCutList.append(makeAShortCutItem(0, index++, tr("Set start "),"buttonSetEmbPoint",FUN_SETSTARTPOINT));//定起始点
    m_allShortCutList.append(makeAShortCutItem(0, index++, tr("Back start"),"buttonBackEmbPoint",FUN_BACKSTARTPOINT));//回起始点
}

//辅助功能
void HighSingleQui::initAssistList()
{
    m_allAssistList.clear();

    m_allAssistList.append(makeAAssistItem(0,0x0001,tr("Signal"),"buttonSensor",ASSIST_SENSOR));//传感器信号
    m_allAssistList.append(makeAAssistItem(0,0x0002,tr("Action"),"buttonControlAction",ASSIST_CONTROLACTION));//控制动作
    m_allAssistList.append(makeAAssistItem(0,0x0003,tr("HMIUpgrade"),"buttonHMIUpgrade",ASSIST_HMIUPGRADE));//界面升级
    m_allAssistList.append(makeAAssistItem(0,0x0004,tr("MCUpgrade"),"buttonMCUpgrade",ASSIST_MCUPGRADE));//主控升级
    m_allAssistList.append(makeAAssistItem(0,0x0006,tr("ParaImport"),"buttonParaImport",ASSIST_PARAIMPORT));//参数导入
    m_allAssistList.append(makeAAssistItem(0,0x0007,tr("ParaExport"),"buttonParaExport",ASSIST_PARAEXPORT));//参数导出
    m_allAssistList.append(makeAAssistItem(0,0x0008,tr("SoftwareSet"),"buttonSoftwareSet",ASSIST_SOFTWARESET));//软件设置
    m_allAssistList.append(makeAAssistItem(0,0x0009,tr("Authorization"),"buttonSoftwareAuthor",ASSIST_AUTHORIZATION));//软件授权
    m_allAssistList.append(makeAAssistItem(0,0x000A,tr("Network"),"buttonNetworkManage",ASSIST_NETWORK));//网络管理
    m_allAssistList.append(makeAAssistItem(0,0x000C,tr("Time"),"buttonTimeSet",ASSIST_TIMESET));//时间设置
    m_allAssistList.append(makeAAssistItem(0,0x000F,tr("Version"),"buttonVersionInfo",ASSIST_MCVERSION));//版本信息
    m_allAssistList.append(makeAAssistItem(0,0x0014,tr("Root"),"buttonRoot",ASSIST_ROOT));//超级用户
//    m_allAssistList.append(makeAAssistItem(0,0x0015,tr("DebugInfo"),"buttonSpindleTest",ASSIST_DEBUGINFO));//调试信息
}

//花样设置
void HighSingleQui::initPatternSetList()
{
    m_allPatternSetList.clear();

    m_allPatternSetList.append(makeAPatternSetItem(0,0x0001,tr("Para"),"buttonPatternPara",PATTERNSET_PATTERNPARA));//花样参数
    m_allPatternSetList.append(makeAPatternSetItem(0,0x0002,tr("Select"),"buttonPatternSelect",PATTERNSET_PATTERNSELECT));//花样选择
    m_allPatternSetList.append(makeAPatternSetItem(0,0x0004,tr("Import"),"buttonPatternImport",PATTERNSET_PATTERNIMPORT));//花样导入
    m_allPatternSetList.append(makeAPatternSetItem(0,0x0005,tr("Export"),"buttonPatternExport",PATTERNSET_PATTERNEXPORT));//花样导出
    m_allPatternSetList.append(makeAPatternSetItem(0,0x0006,tr("Delete"),"buttonPatternDelete",PATTERNSET_PATTERNDELETE));//花样删除
}

//参数分类(参数分组功能)
void HighSingleQui::initParaSetList()
{
    m_allParaSetList.clear();

    m_allParaSetList.append(makeAParaSetItem(0,0x0001,tr("OperatPara"),"buttonPositionParas",PARASET_SETTING));//设置参数  //操作参数
    m_allParaSetList.append(makeAParaSetItem(0,0x0002,tr("ActionSet"),"buttonActionParas",PARASET_ACTION));//动作参数   //动作设定
    m_allParaSetList.append(makeAParaSetItem(0,0x0003,tr("SpeedPara"),"buttonSpeedParas",PARASET_SPEED));//速度参数  //速度控制参数
    m_allParaSetList.append(makeAParaSetItem(0,0x0004,tr("LimitPara"),"buttonDetectParas",PARASET_POSITION));// 位置参数  //限位参数
    m_allParaSetList.append(makeAParaSetItem(0,0x0005,tr("MCPara"),"buttonSettingParas",PARASET_DETECT));//设置参数    //机器参数
}

//初始化传感器列表
void HighSingleQui::initSensorList()
{
    QList <SensorItem> sensorList;

    sensorList.append(makeASensorItem(0x0000, 0, tr("Start button 1")));//启动按钮1
    sensorList.append(makeASensorItem(0x0001, 0, tr("Pause button 1")));//暂停按钮1
    sensorList.append(makeASensorItem(0x0007, 0, tr("Air pressure detection 1")));//气压检测1
    sensorList.append(makeASensorItem(0x0008, 0, tr("Security input 1")));//安全输入1
    sensorList.append(makeASensorItem(0x0020, 0, tr("X zero position")));//X零位
    //    sensorList.append(makeASensorItem(0x0020, 1, tr("Y zero position")));//Y零位
    //    sensorList.append(makeASensorItem(0x0021, 0, tr("X deceleration")));//X降速
    sensorList.append(makeASensorItem(0x0021, 1, tr("Y deceleration")));//Y降速
    //    sensorList.append(makeASensorItem(0x0022, 0, tr("X negative limit")));//X负限位
    //    sensorList.append(makeASensorItem(0x0022, 1, tr("Y negative limit")));//Y负限位
    sensorList.append(makeASensorItem(0x0023, 0, tr("X positive limit")));//X正限位
    sensorList.append(makeASensorItem(0x0023, 1, tr("Y positive limit")));//Y正限位

    sensorList.append(makeASensorItem(0x0040, 0, tr("Sewing machine head 1 lifting upper limit")));//缝纫机头1升降上限位
    sensorList.append(makeASensorItem(0x0042, 0, tr("Lower lifting limit of sewing machine head 1")));//缝纫机头1升降下限位
    sensorList.append(makeASensorItem(0x0080, 0, tr("Sewing spindle 1 needle - parking space")));//缝纫主轴1针-停车位
    sensorList.append(makeASensorItem(0x0088, 0, tr("Sewing shuttle 1- parking space")));//缝纫旋梭1-停车位
    sensorList.append(makeASensorItem(0x0170, 0, tr("Sewing machine head 1 - surface thread breakage inspection")));//缝纫机头1-面线断检

    //将机型所需的传感器列表替换到传感器整体列表中
    for(int i = 0; i < sensorList.size(); i++)
    {
        int byteaddr = sensorList[i].m_byte_offset;
        int bitaddr = sensorList[i].m_bit_offset;
        QString str = sensorList[i].m_name;
        int type = sensorList[i].m_type;

        int idx = byteaddr*8+bitaddr;
        if(idx < m_allSensorList.size())
        {
            m_allSensorList[idx].m_name = str;
            m_allSensorList[idx].m_type = type;
        }
    }
}

//初始化错误代码和状态列表
void HighSingleQui::initErrorCodeAndStateList()
{
    m_allErrorCodeAndStateList.clear();
}

